# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: deal_test.py
# Time: 19:05

import allure
import pytest
from common.data.deal_data import data as money
from common.util.env_util import EnvironmentConfiguration
from pages.transaction.execute import TransitionBiz
from pages.login.execute import LoginBiz
from common.data.login_data import data as logindata

@allure.feature("{casename}")
@allure.severity(allure.severity_level.CRITICAL)
@pytest.mark.parametrize("casename,money",money.get(EnvironmentConfiguration().get_environment()))
@pytest.mark.parametrize("phon,password",logindata.get(EnvironmentConfiguration().get_environment()))
def test_deal(poco,log,interim,casename,money,phon,password):
    log.info(f"开始执行测试用例：{casename}")
    LoginBiz(poco,log).login(phon,password)
    TransitionBiz(poco,log).transaction(money)


if __name__ == '__main__':
    pytest.main(["-s","-v","deal_test.py"])